class TreeNode:
    def __init__(self, val=0, left=None, right=None):
        self.val = val
        self.left = left
        self.right = right

def generate_test_cases():
    """生成二叉树测试用例"""
    # 测试用例1: [1,2,3,null,5]
    case1 = TreeNode(1)
    case1.left = TreeNode(2)
    case1.right = TreeNode(3)
    case1.left.right = TreeNode(5)
    
    # 测试用例2: [1]
    case2 = TreeNode(1)
    
    # 测试用例3: [1,2,3,4,5,6,7]
    case3 = TreeNode(1)
    case3.left = TreeNode(2)
    case3.right = TreeNode(3)
    case3.left.left = TreeNode(4)
    case3.left.right = TreeNode(5)
    case3.right.left = TreeNode(6)
    case3.right.right = TreeNode(7)
    
    return [case1, case2, case3]